#define _CRT_SECURE_NO_WARNINGS 1
class A
{
public:
	A(int a = 0)
		: _a(a)
	{
		cout << "A():" << endl;
	}
	~A()
	{
		cout << "~A():" << endl;
	}
private:
	int _a;
};
int main()
{
	// new/delete 和 malloc/free最大区别是 new/delete对于【自定义类型】除了开空间
	//还会调用构造函数和析构函数

	A* p1 = (A*)malloc(sizeof(A));
	//如何对malloc开辟出来的对象进行初始化？？？

	A* p2 = new A(1);
	//new开辟的对象 很方便初始化

	free(p1);

	delete p2;

	return 0;
}